#Target
TgtFile = dialer

#Files to Build
SrcFile1 = synctask
SrcFile2 = syncdial

# App Source Paths
SDS_TOOLS=C:\sds70\cmd
SrcDir = $(SRC_ROOT)\comm

AppModulesObjs = \
	$(OBJ_DIR)\$(SrcFile1).o \
	$(OBJ_DIR)\$(SrcFile2).o 
    
FoundationLibs =  \
#$(ACTRoot)\OutPut\SDS\Files\ShLib1\Debug\ACT.slk    \
#$(ACTRoot)\Lib\sdsshd\ACT.slk 	\   
$(ACT2000)\$(ACT_VER)\OutPut\SDS\Files\Static\Debug\ACT2000.a  \
$(VFSDK)\$(SDK_VER)\lib\libsys.a  

# Compiler Options
Includes = -I $(SDS_INCLUDES) -I $(ACT_INCLUDES) -I $(SP2_INCLUDES) -I $(SERF_INCLUDES) -I $(CARDSLOT_INCLUDE) -I $(VVXEMV_INCLUDES) 
COptions = $(GCOPTIONS) -D__K2__ -D_VSC -D_DEBUG -f -s int=2 -s sizeof=2 -r a4 -r a5 -K2 -o $(@)
linkOptions = -y -w -f$(VFSDK)\$(SDK_VER)\config\link.spc -d $(VFSDK)\$(SDK_VER)\lib\_start.o

#dialer.out :  $(FoundationLibs) $(OBJ_DIR)\synctask.o \
#dialer.out :  $(OBJ_DIR)\synctask.o \
#    $(OBJ_DIR)\syncdial.o

pseudoOut : $(SPFILES)\dialer.out
 @Echo Running OutHdr and Signing...
#  @outhdr -t -v 1.0 -s 3000 -h 3000 -lact.lib=f:/act.lib $(SPFILES)\dialer.out
#imam  @outhdr -t -v 1.0 -s 3000 -h 3000 $(SPFILES)\dialer.out

   @$(VFSDK)\$(SDK_VER)\outhdr -t -v 1.0 -s 3000 -h 3000 $(SPFILES)\dialer.out
  \SOFTPAY\VER30\TOOLS\FILESIGN -c $(VFSDK)\$(SDK_VER)\CONFIG\K2SIGN.CRT -k $(VFSDK)\$(SDK_VER)\CONFIG\K2SIGN.KEY -f $(SPFILES)\dialer.OUT -s $(SPFILES)\dialer.p7s -L
    
$(SPFILES)\dialer.out : $(DBG_DIR)\dialer.odb
  @Echo Running Down...
  @$(SDS_TOOLS)\down -F$(VFSDK)\$(SDK_VER)\config\down.opt $(DBG_DIR)\dialer.odb -o $(@)

$(DBG_DIR)\dialer.odb :  $(AppModulesObjs) $(FoundationLibs)
  @Echo Running Linker... 
  @$(SDS_TOOLS)\linker $(linkOptions) $(FoundationLibs)  $(AppModulesObjs) -o $(@)

